<div class="row pad_top">
    <div class="col-md-2 entryLabel">Part ID</div>
    <div class="col-md-10">{{remoteEntry.partId}}</div>
</div>

<div class="row pad_top" ng-repeat="field in entryFields"
     ng-if="remoteEntry[field.schema]&&remoteEntry[field.schema].toString().length!==0">

    <div class="col-md-2 entryLabel">
        <span ng-class="{'entryEditLabel':field.edit}">{{field.label}}</span>
        <img ng-if="field.updating && !field.errorUpdating" src="img/loader-mini.gif">
        <i ng-if="!field.updating && field.errorUpdating" class="red fa fa-exclamation-circle"></i>
    </div>

    <div class="col-md-10">
        <div>{{remoteEntry[field.schema].toString()}}</div>
    </div>
</div>

<div class="row margin-top-10" ng-if="remoteEntry.linkedParts.length">
    <div class="col-md-12">
        <div class="entry-details-subheader"><strong style="color: #233559;">CONTAINS</strong></div>

        <div ng-repeat="part in remoteEntry.linkedParts">
            <div class="row" ng-if="$index % 2 == 0">
                <div class="col-md-6" ng-if="remoteEntry.linkedParts[$index+0]">
                    <div class="contained-part">
                        <div class="pull-right font-90em" style="padding: .75em .5em;">
                            <a ng-href="web/{{currentPartner.id}}/entry/{{remoteEntry.linkedParts[$index+0].id}}"
                               class="">{{remoteEntry.linkedParts[$index+0].partId}}</a>
                        </div>
                        <div style="display: block; margin-bottom: .2em; color: #555; padding: .75em .5em;">
                            <b>{{remoteEntry.linkedParts[$index+0].type}} <a
                                    ng-href="web/{{currentPartner.id}}/entry/{{remoteEntry.linkedParts[$index+0].id}}"
                                    style="color: #000">{{remoteEntry.linkedParts[$index+0].name}}</a></b>
                        </div>

                        <div style="background-color: #999; color: #fff; padding: 3px; text-align: center">
                            <span ng-if="remoteEntry.linkedParts[$index+0].basePairCount">
                            Sequence with {{remoteEntry.linkedParts[$index+0].basePairCount | number}} base pairs <span
                                    ng-if="remoteEntry.linkedParts[$index+0].featureCount">& {{remoteEntry.linkedParts[$index+0].featureCount}} features</span>
                                </span>
                            <span ng-if="!remoteEntry.linkedParts[$index+0].basePairCount">
                                <i>No sequence data</i>
                                </span>
                        </div>
                        <p style="clear: both; margin: 0; padding: .75em .5em; color: #888;">
                            {{remoteEntry.linkedParts[$index+0].shortDescription}}</p>
                    </div>
                </div>

                <div class="col-md-6" ng-if="remoteEntry.linkedParts[$index+1]">
                    <div class="contained-part">
                        <div class="pull-right font-90em" style="padding: .75em .5em;">
                            <a ng-href="web/{{currentPartner.id}}/entry/{{remoteEntry.linkedParts[$index+1].id}}"
                               class="">{{remoteEntry.linkedParts[$index+1].partId}}</a>
                        </div>
                        <div style="display: block; margin-bottom: .2em; color: #555; padding: .75em .5em;">
                            <b>{{remoteEntry.linkedParts[$index+1].type}} <a
                                    ng-href="web/{{currentPartner.id}}/entry/{{remoteEntry.linkedParts[$index+1].id}}"
                                    style="color: #000">{{remoteEntry.linkedParts[$index+1].name}}</a></b>
                        </div>

                        <div style="background-color: #999; color: #fff; padding: 3px; text-align: center">
                            Sequence with {{remoteEntry.linkedParts[$index+1].basePairCount | number}} base pairs <span
                                ng-if="remoteEntry.linkedParts[$index+1].featureCount">& {{remoteEntry.linkedParts[$index+1].featureCount}} features</span>
                        </div>
                        <p style="clear: both; margin: 0; color: rgba(0,0,0,.45);padding: .75em .5em;">
                            {{remoteEntry.linkedParts[$index+1].shortDescription}}</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row margin-top-10">
    <div class="col-md-12">
        <div class="entry-details-subheader">
            <strong style="color: #233559;">SEQUENCE</strong>

            <div class="pull-right" ng-if="remoteEntry.hasSequence">
                <!--<small class="opacity_hover" ng-click="open()"><i class="fa fa-external-link blue"></i>-->
                <!--Open in VectorEditor-->
                <!--</small>-->

                <!--<span style="font-weight: normal; color: #e3e3e3">&nbsp;&nbsp;|&nbsp;&nbsp;</span>-->

                <small class="btn-group" uib-dropdown>

                    <div uib-dropdown-toggle class="uib-dropdown-toggle opacity_hover">Download <span
                            class="caret"></span>
                    </div>
                    <ul class="uib-dropdown-menu">
                        <li class="cursor_pointer font-80em" ng-if="remoteEntry.hasOriginalSequence">
                            <a ng-href="https://{{currentPartner.url}}/rest/file/{{remoteEntry.id}}/sequence/original"
                               target="_self">Original</a>
                        </li>
                        <li class="cursor_pointer font-80em">
                            <a ng-href="https://{{currentPartner.url}}/rest/file/{{remoteEntry.id}}/sequence/genbank"
                               target="_self"><i>Genbank</i></a>
                        </li>
                        <li class="cursor_pointer font-80em">
                            <a ng-href="https://{{currentPartner.url}}/rest/file/{{remoteEntry.id}}/sequence/fasta"
                               target="_self"><i>FASTA</i></a>
                        </li>
                        <li class="cursor_pointer font-80em">
                            <a ng-href="https://{{currentPartner.url}}/rest/file/{{remoteEntry.id}}/sequence/sbol"
                               target="_self"><i>SBOL</i></a>
                        </li>
                    </ul>
                </small>

                <!--<span style="font-weight: normal; color: #e3e3e3">&nbsp;&nbsp;|&nbsp;&nbsp;</span>-->

                <!--<small class="opacity_hover" ng-click="sbolShowHide()">-->
                <!--<span ng-show="showSBOL">Hide</span>-->
                <!--<span ng-hide="showSBOL">Show</span> Pigeon Image-->
                <!--</small>-->
            </div>

        </div>

        <div class="pad_top" ng-if='!remoteEntry.hasSequence' style="color: #999;">
            <i style="color: #999" class="font-90em">No sequence data provided</i>
        </div>

        <!--sbol-->
        <!--<div style="width: 100%; overflow: auto; position: relative; zoom: 1;" ng-if='remoteEntry.hasSequence'-->
        <!--ng-show="showSBOL">-->
        <!--<div style="width: 0;">-->
        <!--<img height="130px"-->
        <!--ng-src="download?type=sbol_visual&amp;id={{remoteEntry.sbolVisualURL}}&amp;sid={{sessionId}}">-->
        <!--</div>-->
        <!--</div>-->

        <div ng-show="remoteEntry.hasSequence" style="height: 600px">
            <span ice-remote-flash></span>
        </div>
    </div>
</div>

<div class="row margin-top-10" ng-if="remoteEntry.longDescription">
    <div class="col-md-12">
        <div class="entry-details-subheader">
            <strong style="color: #233559;">NOTES</strong>
        </div>
        {{remoteEntry.longDescription}}
    </div>
</div>
